<%@page import="aex.util.Ptool"%>
<%@page import="aex.domain.ArticleCategory"%>
<%@page import="aex.domain.Article"%>
<%@page import="aex.service.ShowViewService"%>
<%@page import="aex.util.SSHUtil"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="aex.domain.Puser"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
WebApplicationContext ac = SSHUtil.getApplication(request);
ShowViewService svService = (ShowViewService) ac.getBean(ShowViewService.SERVICE_NAME);
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta name="keywords" content="${webKeyWord}">
	<meta name="description" content="${webDescription}" />
	<title> ${webTitle} </title>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
  	
	<link rel="stylesheet" type="text/css" href="expandStyle/aex_userPage.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/index.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/tab.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/comment.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/users.css" />
	<link href="systemStyle/H-ui.css" rel="stylesheet" type="text/css" />
	<link href="systemStyle/H-ui.admin.css" rel="stylesheet" type="text/css" />
	
	
	<script type="text/javascript" src="http://libs.useso.com/js/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="expandStyle/aex_userPage.js"></script>
	<script type="text/javascript" src="expandStyle/tab.js"></script>
	<script type="text/javascript" src="expandStyle/message.js"></script>
	<script type="text/javascript" src="systemJs/aex_admin.js"></script>
	<script type="text/javascript" src="plugin/layer/layer.min.js"></script>
	<script type="text/javascript" src="plugin/layer/extend/layer.ext.js"></script>
	<script type="text/javascript" src="systemJs/H-ui.admin.js"></script>
	<script type="text/javascript" src="systemJs/Validform_v5.3.2_min.js"></script>
	
	</head>
  <body>
    
    <!--导航栏-->
    
    <%
    	Puser user=(Puser)request.getSession().getAttribute("user");
    	if(user==null){
    		%>
    			<jsp:include page="/systemPage/headNavVisitor1.jsp"></jsp:include>		
    		<%
    	}else{
    		%>
				<jsp:include page="/systemPage/headNavVisitor2.jsp"></jsp:include>
    		<%
    	}
    %>
	
	
	
	
	 <!--主要内容-->
  <div class="container">
  	 <div class="container_left">
  	     <!--选项卡-->
        <div class="tab1" id="tab1">
           <div class="menu" id="menu_id">
                <ul>
                  <li id="one1" class="off" onclick="setTab('one',1)">文章</li>
                  <li id="one2" onclick="setTab('one',2)">关注</li>
                  <li id="one3" onclick="setTab('one',3)">小组</li>
                  <li id="one4" onclick="setTab('one',4)">留言</li>
                </ul>
           </div>
           <div class="menudiv">
           
           <!-- 我的文章 -->
                <div id="con_one_1" style="display:block;">
               	 <c:forEach var="item" items="${pageBean.objList }" >
                    <div class="post">
                       <a href="visitor/visitor_article.do?arId=${item.arId}"> ${item.arTitle }</a>
                       <div id="topics_comment"> 浏览 (${item.arViewCount })</div>
                    </div> 
                   </c:forEach>
                   	<jsp:include page="/systemPage/paginationVisitor.jsp"></jsp:include>
                   
                 </div>
                 
                 <!-- 我的关注 -->
                 <div id="con_one_2" style="display:none;">
                       <div id="active_usersBox">
                         <ul>
                          	 <c:forEach var="item" items="${her.attentionUsersForAuAttention }" >
	                           <li>
	                              <img src="${item.puserByAuAattentiond.puPhoto }" width="50px" height="50px" >
	                              <div><a href="users.htmlarticle.html">${item.puserByAuAattentiond.puName }</a></div>
	                            </li>
                           </c:forEach>
                           
                         </ul>
                      </div>
                 </div>
                 
                 <!-- 我加入的小组 -->
                  <div id="con_one_3" style="display:none;">
                  
                   <c:forEach var="item" items="${her.categoryEditers }" >
                      <div class="group">
                         <div class="group_img"><img src="${item.articleCategory.acPhoto }" width="80px" height="80px"></div>
                         <div class="group_content">
                            <div class="group_name"><a href="visitor/visitor_showCategory.do?id=${item.articleCategory.acId }">${item.articleCategory.acName }</a><span>共${item.articleCategory.acUserNum }人</span></div>
                            <div class="smallContent">
                              ${item.articleCategory.acDescription }
                            </div>
                         </div>
                      </div>
                   </c:forEach> 
                 </div>
                 
                 
                 <!--留言板-->
                  <div id="con_one_4" style="display:none;">
                 
                     <div class="comment_article">
                        <div class="comment_contentBox">
                         <c:forEach var="item" items="${her.messageBoardsForMbPued }" >
                          <div class="comment_line">
                            <div class="tourist">
                               <img src="${item.puserByMbPu.puPhoto}" width="50px" height="50px" >
                              <div><a href="users.html">${item.puserByMbPu.puName}</a></div>
                            </div>
                            <div class="comment_content">
                              <div class="c_contentTop">
				                      ${item.mbContent}
                              </div>
                                <div class="c_contentDown">
                                &nbsp;&nbsp;&nbsp;<span href="#" id="time">&nbsp;&nbsp; &nbsp;：${item.mbTime}</span>
                              </div>
                              
                            </div>
                          </div>
                          </c:forEach>
                      </div>
                       
                     </div>
                      <div class="play_comment">
                          <form class='demoform' action="visitor/visitor_addLy.do?id=${her.puId }" method="post">
                            <textarea name="content" datatype='*1-500'></textarea>
                            <input type="submit" onclick="" class="submint"  id="p_comment" value="留言"> 
                          </form>
                          <script type="text/javascript">
                          $(".demoform").Validform({
  							tiptype : 3,
  							});
                          </script>
                     </div>
                 </div>
                 
           </div>
  	    </div>
     </div>
  	 <div class="container_right">
        <!--用户-->
        <div id="user_box">
             <img src="${her.puPhoto }" align="left" width="50" height="50" >
            <div class="user_info">
                <h2><a href="users.html">${her.puName}</a></h2>
            </div>
            <ul class="attention_box">
              <li><span>${her.puAttention}</span><div>关注</div></li>
              <li><span>${her.puFans}</span><div>粉丝</div></li>
              <li><span>${her.puScore}</span><div>积分</div></li>
            </ul>
            
             <div class="user_contact">.
             
            <%
            	Puser her=(Puser)request.getAttribute("her");
                if(user!=null&&Ptool.userIsInAttention(user.getAttentionUsersForAuAttention(), her)){
                    out.print("<div><a href='javascript:void(0);' onclick='get(\"visitor/visitor_unattentionUser.do?id="+her.getPuId()+"\")' >取消关注</a></div>");
                 }else{
                     out.print("<div><a href='javascript:void(0);' onclick='get(\"visitor/visitor_attentionUser.do?id="+her.getPuId()+"\")' >关注</a></div>");
                    }
             %>
                       
             
                
                
                
                <div><a href="visitor/visitor_sendMailFromHerHome.do?herId=${her.puId}">发消息</a></div>
            </div>
            
        </div>
      <!--关注的用户-->
       <div id="user_attention">
          <h2>关注的用户</h2>
           <ul>
               <c:forEach var="item" items="${her.attentionUsersForAuAttention }" >
                  <li>
                     <img src="${item.puserByAuAattentiond.puPhoto }" width="50px" height="50px" >
                     <div><a href="users.htmlarticle.html">${item.puserByAuAattentiond.puName }</a></div>
                   </li>
                </c:forEach>
           </ul>
       </div>
      <!--加入的小组-->
       <div id="add_groups">
          <h2>加入的小组</h2>
           <ul>
           <c:forEach var="item" items="${her.categoryEditers }" >
           		<li>
                  <img src="${item.articleCategory.acPhoto }" width="50px" height="50px" >
                  <div><a href="visitor/visitor_showCategory.do?id=${item.articleCategory.acId }">${item.articleCategory.acName }</a></div>
                </li> 
             </c:forEach>         
           </ul>
       </div>
     </div>
  </div>
	
    <!--网站底部-->
	<jsp:include page="/systemPage/footerVisitor.jsp"></jsp:include>
  </body>
</html>
